#pragma once
#include <ctime>
#include <random>
#include <vector>

typedef std::vector<std::vector<int>> matrix;

class Data
{
public:
    Data();                                                                 // default construct a 4*4 matrix
    ~Data();                                                                // destruct
    Data(const Data&);
    void random_init();                                                     // randomly produce data
    void clear();                                                           // clear the matrix
    [[nodiscard]] int get_number(const int &row, const int &column) const;  // get number from row and column
    bool set_number(const int &row, const int &column, int number_input);   // set number in row and column, return success or not
    [[nodiscard]] bool is_empty(const int &row, const int &column) const;   // return number in row and column is empty or not
    Data& operator=(const Data &data_input);
    [[nodiscard]] int& getNewRow(){return this->m_newRow;}
    [[nodiscard]] int& getNewColumn(){return this->m_newColumn;}
private:
    matrix *data_matrix_;
    int m_newRow;
    int m_newColumn;
};
